using System.Collections;
using System.Collections.Generic;
using UnityEngine;

// 控制固定景色移动
public class FixedSpeedControl : MonoBehaviour
{
    public float speed = 5f;

    void Update()
    {
        Vector2 pos = transform.position;
        pos.x -= speed * Time.deltaTime;
        if(pos.x < -35.9f){
            pos.x += 35.9f;
        }
        transform.position = pos;
    }
}
